package com.hl.card.modular.system.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.hl.card.common.annotion.DataSource;
import com.hl.card.common.constant.DSEnum;
import com.hl.card.common.constant.factory.MutiStrFactory;
import com.hl.card.common.exception.BizExceptionEnum;
import com.hl.card.common.exception.BussinessException;
import com.hl.card.common.persistence.dao.SysDicMapper;
import com.hl.card.common.persistence.dao.SysDicTypeMapper;
import com.hl.card.common.persistence.model.SysDic;
import com.hl.card.common.persistence.model.SysDicType;
import com.hl.card.common.util.PinYinUtil;
import com.hl.card.modular.system.dao.SysDicDao;
import com.hl.card.modular.system.service.ISysDicService;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
@Transactional
public class SysDicServiceImpl implements ISysDicService {


    @Resource
    SysDicTypeMapper sysDicTypeMapper;

    @Resource
    SysDicMapper sysDicMapper;

    @Resource
    SysDicDao sysDicDao;

    @Override
    //@DataSource(name = DSEnum.DATA_SOURCE_BIZ)
    public List<Map<String, Object>> selectListByCode(String code) {
        List<Map<String, Object>> list=  sysDicDao.selectListByCode(code);
        return list;
    }

    @Override
    //@DataSource(name = DSEnum.DATA_SOURCE_BIZ)
    public Map<String, Object> selectListByCodeNo(String code, String no) {
        return sysDicDao.selectListByCodeNo(code,no);
    }
}
